[17.0][OU-ADD] product_pricelist_supplierinfo: Migration scripts#2212
[17.0][OU-ADD] product_pricelist_supplierinfo: Migration scripts#2212pedrobaeza wants to merge 1 commit intoOCA:17.0from
Conversation
When coming from previous versions, where the discount at product.supplierinfo were not taken into account to compute the sales price, you would expect the same for this version, so for this smooth transition, let's set the new flag for ignoring the discount in all the existing lines for preserving the previous behavior, as well as setting it as default for new items. TT61036
|
Hi @luisg123v, |
| env.cr, | ||
| "UPDATE product_pricelist_item SET no_supplierinfo_discount=True", | ||
| ) | ||
| env["ir.default"].set("product.pricelist.item", "no_supplierinfo_discount", "true") |
There was a problem hiding this comment.
Are you sure about this?
I think this could be a source of functional discrepancies, new lines will start having this default but only in migrated databases that went through this migration script. What do you think about setting as default at field declaration instead?
There was a problem hiding this comment.
Yes, I'm sure, as this is only for migrated DBs. Users of these DBs are used to create pricelist items without having to mark any check for having that behavior, and if this default is not put, they will have differences between the old and new pricelist items. If they are aware, they will ask for removing it, or they will uncheck it when needed.
There was a problem hiding this comment.
If changing this default now, current users of 17 will have a change of behavior comparable to the migrated users.
When coming from previous versions, where the discount at product.supplierinfo were not taken into account to compute the sales price, you would expect the same for this version, so for this smooth transition, let's set the new flag for ignoring the discount in all the existing lines for preserving the previous behavior, as well as setting it as default for new items.
@Tecnativa TT61036